﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tradex.Messages {
    
    /// <summary>
    /// The PingMessage submits a ping request (the request to send back a poing message to test
    /// connectivity and measure round trip delays).
    /// </summary>
    [Serializable ()]
    public sealed class PingMessage : Message {

        /// <summary>
        /// Public constructor.
        /// </summary>
        public PingMessage() {
            Identity = Guid.NewGuid();
            Timestamp = DateTime.UtcNow;
        }

        /// <inheritdoc />
        public override MessageCode Code {
            get { return MessageCode.Ping; }
        }

        /// <summary>
        /// The identity of the request.
        /// </summary>
        public Guid Identity { get; private set; }

        /// <summary>
        /// The timestamp of the request.
        /// </summary>
        public DateTime Timestamp { get; private set; }

    }
}
